package cn.libinal.scloud.base.common.web;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class DateTimeRange {
    private static final String DEFAULT_PATTERN = "yyyy-MM-dd HH:mm:ss";

    /**
     * 开始时间
     */
    @JsonFormat(pattern = DEFAULT_PATTERN)
    @DateTimeFormat(pattern = DEFAULT_PATTERN)
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = DEFAULT_PATTERN)
    @DateTimeFormat(pattern = DEFAULT_PATTERN)
    private Date endTime;
}
